package test21To30;

import java.util.*;

public class Test23 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()){
            String s = scanner.nextLine();
            char[] chars = s.toCharArray();
            Map<Character,Integer> map = new HashMap<>();
            for (char c:chars){
                if (map.containsKey(c)){
                    int i = map.get(c) + 1;
                    map.put(c,i);
                }else {
                    map.put(c, 1);
                }
            }

            Optional<Integer> first = map.values().stream().sorted().findFirst();
            Integer v = first.get();

            for(int i=0;i<s.length();i++){
                if(!map.get(s.charAt(i)).equals(v)){
                    System.out.print(s.charAt(i));
                }
            }

            map.clear();

        }
    }
}
